import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_widgets/flutter_widgets.dart';

void main() {
  group('buttons', () {
    testWidgets('buttons', (WidgetTester tester) async {
      var child = CommonFlatButton(
        text: 'Flat',
        onPressed: () {},
      );
      await tester.pumpWidget(
        WidgetTheme(
          data: WidgetThemeData(),
          child: MaterialApp(
            home: Scaffold(
              body: child,
            ),
          ),
        ),
      );
      expect(find.byWidget(child), findsOneWidget);
    });
  });
}
